package com.gao.spring.annotation;

import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

/**
 * @Projectname SSM
 * @Filename ValidateAspect
 * @Author an
 * @Data 2022/8/2 19:04
 * @Description TODO
 */
@Component
@Aspect
@Order()
public class ValidateAspect {

    /*
    * 切面的优先级
    * 可以通过@Order注解的value属性设置优先级，默认值Integer的最大值
    * @Order注解的value属性值越小，优先级越高
    * */

//    @Before("execution(* com.gao.spring.annotation.CalculatorImpl.*(..))")
    @Before("com.gao.spring.annotation.LoggerAspect.pointCut()")
    public void beforeMethod(){
        System.out.println("ValidateAspect--->前置通知");
    }
}
